Skip to content

fix: handle terminating chunk correctly in Dechunk HTTP response#2258

Closed
vishalbhalla02 wants to merge 1 commit into
gchq:masterfrom
vishalbhalla02:fix/2247-dechunk-termination
Closed

fix: handle terminating chunk correctly in Dechunk HTTP response#2258
vishalbhalla02 wants to merge 1 commit into
gchq:masterfrom
vishalbhalla02:fix/2247-dechunk-termination

Conversation

@vishalbhalla02

Copy link
Copy Markdown

Fixes #2247

  • Detects terminating zero-length chunk (chunkSize === 0)
  • Prevents trailer data from leaking into output
  • Handles chunk termination correctly as per RFC 7230

@CLAassistant

CLAassistant commented Mar 17, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@GCHQDeveloper581 GCHQDeveloper581 self-requested a review March 18, 2026 15:16

@GCHQDeveloper581 GCHQDeveloper581 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add some tests.

One that would pass before this change (no 0 length section) and one that would fail without this change (eg the case in the original issue #2247)

@GCHQDeveloper581

Copy link
Copy Markdown
Contributor

Separately fixed in #2290, so closing this one.

Thanks for contributing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug report: Dechunk HTTP Response leaks terminating chunk and trailers into output

3 participants